FROM openshift/golang-builder@sha256:4820580c3368f320581eb9e32cf97aeec179a86c5749753a14ed76410a293d83 AS builder
ENV __doozer=update BUILD_RELEASE=202203080140.p0.g62d09f9.assembly.stream BUILD_VERSION=v4.10.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=10 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.10.0-202203080140.p0.g62d09f9.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=62d09f9 OS_GIT_VERSION=4.10.0-202203080140.p0.g62d09f9.assembly.stream-62d09f9 SOURCE_DATE_EPOCH=1646699159 SOURCE_GIT_COMMIT=62d09f934bc6a22495ee3d29eb453534e7773101 SOURCE_GIT_TAG=v0.0.0-alpha.0-480-g62d09f934 SOURCE_GIT_URL=https://github.com/openshift/sdn 
WORKDIR /go/src/github.com/openshift/sdn
COPY . .
RUN make build --warn-undefined-variables

FROM openshift/ose-base:v4.10.0-202203040217.p0.g5d526c4.assembly.stream
ENV __doozer=update BUILD_RELEASE=202203080140.p0.g62d09f9.assembly.stream BUILD_VERSION=v4.10.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=10 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.10.0-202203080140.p0.g62d09f9.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=62d09f9 OS_GIT_VERSION=4.10.0-202203080140.p0.g62d09f9.assembly.stream-62d09f9 SOURCE_DATE_EPOCH=1646699159 SOURCE_GIT_COMMIT=62d09f934bc6a22495ee3d29eb453534e7773101 SOURCE_GIT_TAG=v0.0.0-alpha.0-480-g62d09f934 SOURCE_GIT_URL=https://github.com/openshift/sdn 
RUN INSTALL_PKGS="conntrack-tools" && \
    yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
    yum clean all && rm -rf /var/cache/*

COPY --from=builder /go/src/github.com/openshift/sdn/kube-proxy /usr/bin/
COPY ./images/iptables-scripts/iptables /usr/sbin/
COPY ./images/iptables-scripts/iptables-save /usr/sbin/
COPY ./images/iptables-scripts/iptables-restore /usr/sbin/
COPY ./images/iptables-scripts/ip6tables /usr/sbin/
COPY ./images/iptables-scripts/ip6tables-save /usr/sbin/
COPY ./images/iptables-scripts/ip6tables-restore /usr/sbin/

LABEL \
        io.k8s.display-name="Kubernetes kube-proxy" \
        io.k8s.description="Provides kube-proxy for external CNI plugins" \
        io.openshift.tags="openshift,kube-proxy" \
        name="openshift/ose-kube-proxy" \
        com.redhat.component="kube-proxy-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Networking" \
        io.openshift.maintainer.subcomponent="openshift-sdn" \
        release="202203080140.p0.g62d09f9.assembly.stream" \
        io.openshift.build.commit.id="62d09f934bc6a22495ee3d29eb453534e7773101" \
        io.openshift.build.source-location="https://github.com/openshift/sdn" \
        io.openshift.build.commit.url="https://github.com/openshift/sdn/commit/62d09f934bc6a22495ee3d29eb453534e7773101" \
        version="v4.10.0"

